<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<link rel="stylesheet"
	href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"
	integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
	crossorigin="anonymous">
<script type="text/javascript"
	src="https://cdn.bootcss.com/jquery/1.12.1/jquery.min.js"></script>
<script type="text/javascript">
	$(function() {
		$("#refresh").click(function() {
			$.ajax({
				url : "/rules/refresh",
				type: "post",
				dataType: "json",
				success : function(result) {
					alert(result.status);
				}
			});
		});
	});
</script>
<title>ruleList</title>
</head>
<body>
	<hr>
	<p>列表</p>
	<input type="button" value="刷新规则" id="refresh" />
	<div style="width: 800px; margin: 50px auto;">
		<table class="table">
			<thead>
				<tr>
					<td>规则id</td>
					<td>规则描述</td>
					<td>规则状态</td>
					<td>创建时间</td>
					<td>操作</td>
				</tr>
			</thead>
			<tbody th:remove="all-but-first">
				<tr th:each="rule:${ruleList}">
					<td th:text="${rule.id}"></td>
					<td th:text="${rule.des}"></td>
					<td th:text="${rule.status}"></td>
					<td
						th:text="${#dates.format(rule.createTime, 'yyyy-MM-dd HH:mm:ss')}"></td>
					<td><a href="#"
						th:href="@{/rules/ruleDetails(id=${rule.id})}">查看drl</a> <a
						href="#" th:href="@{/rules/redictCreateRule}">创建规则</a></td>
				</tr>
			</tbody>
		</table>
	</div>
</body>
</html>